package com.lzh.dlykserver.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum CodeEnum {

    OK(200, "成功"),

    FAIL(500, "失败"),

    TOKEN_IS_EMPTY(901, "请求参数token为空"),

    TOKEN_IS_EXPIRED(902, "token已过期"),

    TOKEN_IS_NONE_MATCH(903, "请求token有误"),

    TOKEN_IS_ERROR(904, "token错误"),

    user_logout(200, "退出成功！"),

    DATA_ACCESS_EXCEPTION(500, "数据库操作失败"),

    ACCESS_DENIED(500, "权限不足");

    //结果码
    private int code;

    //结果信息
    private String msg;

    CodeEnum(String msg) {
        this.msg = msg;
    }

}
